jQuery(function($){
	$("#auction_type").change(function(){
		$(".auction_type").hide();
		$(".auction_type_" + this.value).show();
	});
	
	$("#billing_type").change(function(){
		$(".billing_type").hide();
		$(".billing_type_" + this.value).show();
	});
	
	$("#is_all_city").change(function(){
		if(this.checked)
		{
			$(".auction_city").each(function(i){
				if(this.checked)
					this.setAttribute('isChecked',1);
				else
					this.setAttribute('isChecked',0);
				this.checked = false;
			});
		}
		else
		{
			$(".auction_city").each(function(i){
				if(this.getAttribute('isChecked') == 1)
					this.checked = true;
				else
					this.checked = false;
			});
		}
		$(".auction_city").attr({"disabled":this.checked});
	});
});